package com.heima.behavio.conroller.v1;

import com.heima.behavio.service.UserBehaviorService;
import com.heima.model.behavior.dtos.UnLikesBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xjs
 * @date 2022/9/7 12:56
 * description
 */
@RestController
@RequestMapping("/api/v1")
public class UserBehaviorController {

    @Autowired
    private UserBehaviorService userBehaviorService;

    @PostMapping("/un_likes_behavior")
    public ResponseResult userUnlike(@RequestBody UnLikesBehaviorDto unLikesBehaviorDto){
        userBehaviorService.likeLog(unLikesBehaviorDto);
        return ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);
    }

}
